package com.zhihui.service;

import com.zhihui.mapper.SystemUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * Created by hengxing on 2017/9/11.
 */
@Service("systemUserService")
public class SystemUserServiceImp implements SystemUserService {
    @Autowired
    private SystemUserMapper systemUserMapper;
    @Override
    public List<Map<String, Object>> queryUserList() {


        List<Map<String, Object>>  objList=systemUserMapper.queryObjList();
        System.out.println("查询结果长度:"+objList.size());
        return objList;
    }

    @Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class)
    @Override
    public int updateUSer() {
        return 0;
    }
}
